using System;
using System.Collections.Generic;
using System.Text;

namespace Poka_Yoke.Analysis
{
    public class AnalysisResult
    {
        private int _lineNumber;
        public int LineNumber
        {
            get
            {
                return _lineNumber;
            }
        }

        private string _errorMessage;
        public string ErrorMessage
        {
            get
            {
                return _errorMessage;
            }
        }

        private Severity _errorSeverity;
        public Severity ErrorSeverity
        {
            get
            {
                return _errorSeverity;
            }
        }

        public AnalysisResult(int lineNumber, string errorMessage, Severity severity)
        {
            if (lineNumber <= 0)
            {
                throw new ArgumentOutOfRangeException("lineNumber");
            }

            if (String.IsNullOrEmpty(errorMessage))
            {
                throw new ArgumentNullException("errorMessage");
            }

            _lineNumber = lineNumber;
            _errorMessage = errorMessage;
            _errorSeverity = severity;
        }
    }
}
